import{$ as e,$n as t,D as n,Ft as r,On as i,Yt as a,Zn as o,b as s,ct as c,er as l,et as u,g as d,k as f,mt as p,o as m,un as h,v as g,vn as _,xt as v,y}from"./CIxmKYxc4tZcJF.js";import{S as b}from"./DWlEJV-j33On0I.js";import{f as x}from"./CrVzHk_r1oIxh7.js";import{t as S}from"./DfhwXq2y42akxk.js";import{t as C}from"./DDCtipxfV6SuM.js";var w=f({__name:`oui-separator`,props:e({side:{},minSize:{},maxSize:{},absolute:{type:Boolean,default:!1},color:{},name:{}},{modelValue:{required:!0},modelModifiers:{},styleValue:{required:!1},styleValueModifiers:{}}),emits:[`update:modelValue`,`update:styleValue`],setup(e){let t=e,n=r(e,`modelValue`),i=t.name?x(`oui.separator.${t.name}`,n.value):_(n.value),a=_(!1),s=r(e,`styleValue`);function u(){s.value={[t.side===`top`||t.side===`bottom`?`height`:`width`]:C(i.value)}}function f(e){i.value=Math.max(t.minSize,Math.min(t.maxSize,e)),n.value=i.value,u()}c(()=>{t.name||i.value&&(i.value<t.minSize||i.value>t.maxSize)?f(i.value):u()});let m=0;function h(e){a.value=!0,m=i.value}function v(e){t.side===`top`?f(m+e.moveY):t.side===`bottom`?f(m-e.moveY):t.side===`left`?f(m+e.moveX):f(m-e.moveX)}function y(e){v(e),a.value=!1}let b=d(()=>t.color?`--separator: ${t.color}`:void 0);return(t,n)=>(p(),g(S,{class:o([`oui-separator`,{[`_${e.side}`]:!0,_active:a.value,_absolute:e.absolute}]),style:l(b.value),onMoveStart:h,onMoveEnd:y,onMove:v},null,8,[`class`,`style`]))}}),T=f({__name:`oui-resizeable`,props:{name:{},side:{},size:{},minSize:{},maxSize:{},color:{},hide:{type:Boolean},static:{type:Boolean}},setup(e){let r=e,o=x(`oui.resizeable.${r.name}`,r.size),c=_();return(r,l)=>e.static?(p(),s(`div`,t(u({key:0},r.$attrs)),[v(r.$slots,`default`)],16)):(p(),s(m,{key:1},[e.side===`right`||e.side===`bottom`?a((p(),s(`div`,u({key:0,style:c.value},r.$attrs,{class:`oui-resizeable`}),[v(r.$slots,`default`)],16)),[[b,e.hide!==!0]]):y(``,!0),a(n(w,{modelValue:i(o),"onUpdate:modelValue":l[0]||=e=>h(o)?o.value=e:null,"style-value":c.value,"onUpdate:styleValue":l[1]||=e=>c.value=e,side:e.side,"min-size":e.minSize,"max-size":e.maxSize,color:e.color},null,8,[`modelValue`,`style-value`,`side`,`min-size`,`max-size`,`color`]),[[b,e.hide!==!0]]),e.side===`left`||e.side===`top`?a((p(),s(`div`,u({key:1,style:c.value},r.$attrs,{class:`oui-resizeable`}),[v(r.$slots,`default`)],16)),[[b,e.hide!==!0]]):y(``,!0)],64))}});export{w as n,T as t};